var app=angular.module('myapp',['ngRoute']);
app.controller('login',['$scope','$window',function($scope,$window,$){
	$scope.submit=function(str){
		$window.console.log($scope.name);
	}
}])
app.controller('login-chlid',['$scope',function($scope){
	$scope.someProperty="hello";
	$scope.someAction=function(){
		$scope.someProperty="hello zhangxin"
	}
	$scope.fields=[
		{placeholder:'Uername',isRequir:true},
		{placeholder:'Password',isRequir:true},
		{placeholder:'Email',isRequir:false}
	]
	$scope.submitFrom=function(){
		alert("it success!");
	}
}])
app.run(function($rootScope,$timeout,$window){
	$timeout(function(){
		$rootScope.myHref="https://www.baidu.com";
		$window.console.log(123)
	},2000);
})
    .controller('SomeCtrl', function($scope) {
      // anti-pattern, bare value
      $scope.someBareValue = 'hello computer';
      // set actions on $scope itself, this is okay
      $scope.someAction = function() {
        $scope.someBareValue = 'hello human, from parent';
      };
    })
    .controller('ChildCtrl', function($scope) {
      $scope.childAction = function() {
        $scope.someBareValue = 'hello human, from child';
      }
    });